﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LastoRevival.Service.Contracts.Models
{

	public class UserProfileDetails
	{
		public const int AnonymousUserID = -1;


		public int UserID { get; set; }
		public string Username { get; set; }
		public bool Locked { get; set; }
		public bool Verified { get; set; }
		public int GroupID { get; set; }
		public string GroupName { get; set; }


		public bool IsAdministrator
		{
			get { return GroupID == (int)BuiltInGroups.Administrator; }
		}

		public static UserProfileDetails CreateAnonymous()
		{
			var instance = new UserProfileDetails
			{
				UserID = AnonymousUserID,
				GroupID = (int)BuiltInGroups.Anonymous,
			};

			return instance;
		}
	}
}
